//----导出类型
export type { VueMetaEnv, TableColumn, TableSort, DialogRef, AppSettings } from "./types";
export type {
  EntityApi,
  EnumEntryReq,
  Entry,
  LayEntry,
  EntityReq,
  EntityModel,
  EntityList,
  EntityPage,
  EntityTotal,
  EntityKey,
  EntityKeyList,
  EntityCreateReq,
  EntityUpdateReq,
  EntityFormReq,
  EntityExportReq,
  EntityImportReq
} from "./api/types";
export type { AuthApi, LoginData, LoginResult, CaptchaResult } from "./api/auth/types";
export type { FileApi, FileInfo, FileBase64Req } from "./api/file/types";
export type { SysApi, LoginUserInfo, LoginUserToken } from "./api/sys/types";

//----导出组件
import type { App } from "vue";

//util
export {
  vueMetaEnv,
  defaultSettings,
  updateMetaEnv,
  updateViteMetaEnv,
  addDynamicRoute,
  updateSettings
} from "./settings";
export { getQueryParams, clearEmpty, deepMerge } from "./utils/grpc";

export { storageUtil } from "./utils/storage";

//API
import request, { axiosConfig } from "./utils/request";
export { request, axiosConfig };
export { BizDict, BizLayDict, CustomBizDict, EnumDict, enumMapCache } from "./api/index";
export type { AntEntry } from "./api/types";
export { authApi } from "./api/auth";
export { fileApi } from "./api/file";
export { wechatApi } from "./api/wechat/index";
export { SysApiImpl } from "./api/sys";

//Dict API
export type { DictEntryModel } from "@/api/dict-entry/types";
export type { DictLayEntryModel } from "@/api/dict-lay-entry/types";
export { EntryDict, dictMapCache } from "./api/dict";

//store
export { store } from "./stores";
export { useAppStore, useAppStoreHook } from "./stores/modules/app";
export { usePermissionStore, usePermissionStoreHook } from "./stores/modules/permission";
export { useUserStore, useUserStoreHook } from "./stores/modules/user";

//router
export { constantRoutes, resetRouter, updateRouter, createNewRouter, testRoutes } from "./router";
import routerRef from "./router";
export { routerRef };

//权限
import directive from "./directive";
export { directive };

//Page
export { LoginPage, HomePage } from "./router";

// 国际化
import i18n from "./lang/index";
export { i18n };

//Components
import JmashDictSelect from "./components/JmashDictSelect/index.vue";
import JmashDictPicker from "./components/JmashDictPicker/index.vue";
import Vue3CupUi from "jmash-cup-ui";
import "jmash-cup-ui/lib/vue3-cup-ui.common.css";
export { loadSDK } from "./utils/loadSDK";

// 全局注册Jmash-core插件.
const jmash = {
  async install(app: App) {
    app.component("jmash-dict-select", JmashDictSelect);
    app.component("jmash-dict-picker", JmashDictPicker);
    app.use(Vue3CupUi);
  }
};
export default jmash;
